package com.sense.sensedialprehandle.pojo;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;

import java.util.List;

@Data
@JsonIgnoreProperties(value = "pd")
public class Page {
    private int showCount; //每页显示记录数
    private int totalPage;		//总页数
    private int totalResult;	//总记录数
    private int currentPage;	//当前页
    private PageData pd = null;
    private List list = null;

    public Page(){}

    public int getTotalPage() {
        if(getTotalResult()%getShowCount()==0){
            this.totalPage = getTotalResult()/getShowCount();
        }else{
            this.totalPage =  getTotalResult()/getShowCount()+1;
        }
        return this.totalPage;
    }

}
